import { request } from "@/utils/http";

export function getAddressList() {
    return request({
      method: 'GET',
      url: '/materials/api/client/user/userAddressList'
    });
}

export function addAddress(data: any) {
  return request({
    method: 'POST',
    url: '/materials/api/client/user/addUserAddress',
    data
  });
}

export function updateAddress(data: any) {
  return request({
    method: 'POST',
    url: '/materials/api/client/user/updateUserAddress',
    data
  });
}

export function getAddressAll(params: any) {
  return request({
    method: 'GET',
    url: '/materials/api/common/address/getAddressAll',
    params
  });
}

export function deleteAddress(params: any) {
  return request({
    method: 'GET',
    url: '/materials/api/client/user/delete',
    params
  });
}

export function setDefaultAdd(params: any) {
  return request({
    method: 'GET',
    url: '/materials/api/client/user/setDefaultAddress',
    params
  });
}